Fix: os6: hide snmp-server community strings when remove_secret is set - #3870
Open
Jurgen1994 wants to merge 2 commits into
Open
Fix: os6: hide snmp-server community strings when remove_secret is set#3870Jurgen1994 wants to merge 2 commits into
Jurgen1994 wants to merge 2 commits into
Conversation
The os6 secret filter only masked `password <hash>` lines; SNMP
community strings in `snmp-server community <string> ro|rw` were
committed to the output repo in plaintext even with remove_secret
enabled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-Request Checklist
rubocop --auto-correct)rake test)Description
With
remove_secret: true, the os6 model (Dell EMC Networking OS6 / N-Series, e.g. N1548) only maskspassword <hash>lines in its secret filter. SNMP community strings pass through unmodified, so a line likeis committed to the output repo in plaintext — and an
rwcommunity is effectively a write credential for the switch.This adds one substitution to the existing
cmd :secretblock:matching how
powerconnectandprocurvealready treatsnmp-server communitylines.Tested against a Dell N1548 running config:
Non-secret lines are unaffected, and behavior is unchanged when
remove_secretis not set (the:secretblock doesn't run then).